Optimal. Leaf size=275 \[ -\frac {b^5 \cos ^3(c+d x)}{3 d}-\frac {2 a^2 b^3 \cos ^5(c+d x)}{d}+\frac {2 b^5 \cos ^5(c+d x)}{5 d}-\frac {5 a^4 b \cos ^7(c+d x)}{7 d}+\frac {10 a^2 b^3 \cos ^7(c+d x)}{7 d}-\frac {b^5 \cos ^7(c+d x)}{7 d}+\frac {a^5 \sin (c+d x)}{d}-\frac {a^5 \sin ^3(c+d x)}{d}+\frac {10 a^3 b^2 \sin ^3(c+d x)}{3 d}+\frac {3 a^5 \sin ^5(c+d x)}{5 d}-\frac {4 a^3 b^2 \sin ^5(c+d x)}{d}+\frac {a b^4 \sin ^5(c+d x)}{d}-\frac {a^5 \sin ^7(c+d x)}{7 d}+\frac {10 a^3 b^2 \sin ^7(c+d x)}{7 d}-\frac {5 a b^4 \sin ^7(c+d x)}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 275, normalized size of antiderivative = 1.00, number of steps
used = 18, number of rules used = 7, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3169, 2713,
2645, 30, 2644, 276, 14} \begin {gather*} -\frac {a^5 \sin ^7(c+d x)}{7 d}+\frac {3 a^5 \sin ^5(c+d x)}{5 d}-\frac {a^5 \sin ^3(c+d x)}{d}+\frac {a^5 \sin (c+d x)}{d}-\frac {5 a^4 b \cos ^7(c+d x)}{7 d}+\frac {10 a^3 b^2 \sin ^7(c+d x)}{7 d}-\frac {4 a^3 b^2 \sin ^5(c+d x)}{d}+\frac {10 a^3 b^2 \sin ^3(c+d x)}{3 d}+\frac {10 a^2 b^3 \cos ^7(c+d x)}{7 d}-\frac {2 a^2 b^3 \cos ^5(c+d x)}{d}-\frac {5 a b^4 \sin ^7(c+d x)}{7 d}+\frac {a b^4 \sin ^5(c+d x)}{d}-\frac {b^5 \cos ^7(c+d x)}{7 d}+\frac {2 b^5 \cos ^5(c+d x)}{5 d}-\frac {b^5 \cos ^3(c+d x)}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 276
Rule 2644
Rule 2645
Rule 2713
Rule 3169
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx &=\int \left (a^5 \cos ^7(c+d x)+5 a^4 b \cos ^6(c+d x) \sin (c+d x)+10 a^3 b^2 \cos ^5(c+d x) \sin ^2(c+d x)+10 a^2 b^3 \cos ^4(c+d x) \sin ^3(c+d x)+5 a b^4 \cos ^3(c+d x) \sin ^4(c+d x)+b^5 \cos ^2(c+d x) \sin ^5(c+d x)\right ) \, dx\\ &=a^5 \int \cos ^7(c+d x) \, dx+\left (5 a^4 b\right ) \int \cos ^6(c+d x) \sin (c+d x) \, dx+\left (10 a^3 b^2\right ) \int \cos ^5(c+d x) \sin ^2(c+d x) \, dx+\left (10 a^2 b^3\right ) \int \cos ^4(c+d x) \sin ^3(c+d x) \, dx+\left (5 a b^4\right ) \int \cos ^3(c+d x) \sin ^4(c+d x) \, dx+b^5 \int \cos ^2(c+d x) \sin ^5(c+d x) \, dx\\ &=-\frac {a^5 \text {Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{d}-\frac {\left (5 a^4 b\right ) \text {Subst}\left (\int x^6 \, dx,x,\cos (c+d x)\right )}{d}+\frac {\left (10 a^3 b^2\right ) \text {Subst}\left (\int x^2 \left (1-x^2\right )^2 \, dx,x,\sin (c+d x)\right )}{d}-\frac {\left (10 a^2 b^3\right ) \text {Subst}\left (\int x^4 \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}+\frac {\left (5 a b^4\right ) \text {Subst}\left (\int x^4 \left (1-x^2\right ) \, dx,x,\sin (c+d x)\right )}{d}-\frac {b^5 \text {Subst}\left (\int x^2 \left (1-x^2\right )^2 \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {5 a^4 b \cos ^7(c+d x)}{7 d}+\frac {a^5 \sin (c+d x)}{d}-\frac {a^5 \sin ^3(c+d x)}{d}+\frac {3 a^5 \sin ^5(c+d x)}{5 d}-\frac {a^5 \sin ^7(c+d x)}{7 d}+\frac {\left (10 a^3 b^2\right ) \text {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sin (c+d x)\right )}{d}-\frac {\left (10 a^2 b^3\right ) \text {Subst}\left (\int \left (x^4-x^6\right ) \, dx,x,\cos (c+d x)\right )}{d}+\frac {\left (5 a b^4\right ) \text {Subst}\left (\int \left (x^4-x^6\right ) \, dx,x,\sin (c+d x)\right )}{d}-\frac {b^5 \text {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {b^5 \cos ^3(c+d x)}{3 d}-\frac {2 a^2 b^3 \cos ^5(c+d x)}{d}+\frac {2 b^5 \cos ^5(c+d x)}{5 d}-\frac {5 a^4 b \cos ^7(c+d x)}{7 d}+\frac {10 a^2 b^3 \cos ^7(c+d x)}{7 d}-\frac {b^5 \cos ^7(c+d x)}{7 d}+\frac {a^5 \sin (c+d x)}{d}-\frac {a^5 \sin ^3(c+d x)}{d}+\frac {10 a^3 b^2 \sin ^3(c+d x)}{3 d}+\frac {3 a^5 \sin ^5(c+d x)}{5 d}-\frac {4 a^3 b^2 \sin ^5(c+d x)}{d}+\frac {a b^4 \sin ^5(c+d x)}{d}-\frac {a^5 \sin ^7(c+d x)}{7 d}+\frac {10 a^3 b^2 \sin ^7(c+d x)}{7 d}-\frac {5 a b^4 \sin ^7(c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.80, size = 236, normalized size = 0.86 \begin {gather*} \frac {-525 b \left (5 a^4+6 a^2 b^2+b^4\right ) \cos (c+d x)-35 b \left (45 a^4+30 a^2 b^2+b^4\right ) \cos (3 (c+d x))+21 b \left (-25 a^4+10 a^2 b^2+3 b^4\right ) \cos (5 (c+d x))-15 b \left (5 a^4-10 a^2 b^2+b^4\right ) \cos (7 (c+d x))+525 a \left (7 a^4+10 a^2 b^2+3 b^4\right ) \sin (c+d x)+35 a \left (21 a^4-10 a^2 b^2-15 b^4\right ) \sin (3 (c+d x))+21 a \left (7 a^4-30 a^2 b^2-5 b^4\right ) \sin (5 (c+d x))+15 a \left (a^4-10 a^2 b^2+5 b^4\right ) \sin (7 (c+d x))}{6720 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.30, size = 261, normalized size = 0.95 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 194, normalized size = 0.71 \begin {gather*} -\frac {75 \, a^{4} b \cos \left (d x + c\right )^{7} + 3 \, {\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} a^{5} - 10 \, {\left (15 \, \sin \left (d x + c\right )^{7} - 42 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3}\right )} a^{3} b^{2} - 30 \, {\left (5 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} a^{2} b^{3} + 15 \, {\left (5 \, \sin \left (d x + c\right )^{7} - 7 \, \sin \left (d x + c\right )^{5}\right )} a b^{4} + {\left (15 \, \cos \left (d x + c\right )^{7} - 42 \, \cos \left (d x + c\right )^{5} + 35 \, \cos \left (d x + c\right )^{3}\right )} b^{5}}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.92, size = 186, normalized size = 0.68 \begin {gather*} -\frac {35 \, b^{5} \cos \left (d x + c\right )^{3} + 15 \, {\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{7} + 42 \, {\left (5 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{5} - {\left (15 \, {\left (a^{5} - 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \cos \left (d x + c\right )^{6} + 48 \, a^{5} + 80 \, a^{3} b^{2} + 30 \, a b^{4} + 6 \, {\left (3 \, a^{5} + 5 \, a^{3} b^{2} - 20 \, a b^{4}\right )} \cos \left (d x + c\right )^{4} + {\left (24 \, a^{5} + 40 \, a^{3} b^{2} + 15 \, a b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.65, size = 357, normalized size = 1.30 \begin {gather*} \begin {cases} \frac {16 a^{5} \sin ^{7}{\left (c + d x \right )}}{35 d} + \frac {8 a^{5} \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{5 d} + \frac {2 a^{5} \sin ^{3}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} + \frac {a^{5} \sin {\left (c + d x \right )} \cos ^{6}{\left (c + d x \right )}}{d} - \frac {5 a^{4} b \cos ^{7}{\left (c + d x \right )}}{7 d} + \frac {16 a^{3} b^{2} \sin ^{7}{\left (c + d x \right )}}{21 d} + \frac {8 a^{3} b^{2} \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {10 a^{3} b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{3 d} - \frac {2 a^{2} b^{3} \sin ^{2}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{d} - \frac {4 a^{2} b^{3} \cos ^{7}{\left (c + d x \right )}}{7 d} + \frac {2 a b^{4} \sin ^{7}{\left (c + d x \right )}}{7 d} + \frac {a b^{4} \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} - \frac {b^{5} \sin ^{4}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac {4 b^{5} \sin ^{2}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{15 d} - \frac {8 b^{5} \cos ^{7}{\left (c + d x \right )}}{105 d} & \text {for}\: d \neq 0 \\x \left (a \cos {\left (c \right )} + b \sin {\left (c \right )}\right )^{5} \cos ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.65, size = 259, normalized size = 0.94 \begin {gather*} -\frac {{\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \cos \left (7 \, d x + 7 \, c\right )}{448 \, d} - \frac {{\left (25 \, a^{4} b - 10 \, a^{2} b^{3} - 3 \, b^{5}\right )} \cos \left (5 \, d x + 5 \, c\right )}{320 \, d} - \frac {{\left (45 \, a^{4} b + 30 \, a^{2} b^{3} + b^{5}\right )} \cos \left (3 \, d x + 3 \, c\right )}{192 \, d} - \frac {5 \, {\left (5 \, a^{4} b + 6 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )}{64 \, d} + \frac {{\left (a^{5} - 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \sin \left (7 \, d x + 7 \, c\right )}{448 \, d} + \frac {{\left (7 \, a^{5} - 30 \, a^{3} b^{2} - 5 \, a b^{4}\right )} \sin \left (5 \, d x + 5 \, c\right )}{320 \, d} + \frac {{\left (21 \, a^{5} - 10 \, a^{3} b^{2} - 15 \, a b^{4}\right )} \sin \left (3 \, d x + 3 \, c\right )}{192 \, d} + \frac {5 \, {\left (7 \, a^{5} + 10 \, a^{3} b^{2} + 3 \, a b^{4}\right )} \sin \left (d x + c\right )}{64 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.42, size = 372, normalized size = 1.35 \begin {gather*} \frac {2\,a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {86\,a^5}{5}-\frac {64\,a^3\,b^2}{3}+32\,a\,b^4\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\left (\frac {86\,a^5}{5}-\frac {64\,a^3\,b^2}{3}+32\,a\,b^4\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (\frac {424\,a^5}{35}+\frac {608\,a^3\,b^2}{7}-\frac {192\,a\,b^4}{7}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (30\,a^4\,b-16\,a^2\,b^3+\frac {16\,b^5}{5}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (50\,a^4\,b-40\,a^2\,b^3+\frac {32\,b^5}{3}\right )-\frac {10\,a^4\,b}{7}-\frac {16\,b^5}{105}-\frac {8\,a^2\,b^3}{7}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (4\,a^5+\frac {80\,a^3\,b^2}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,\left (4\,a^5+\frac {80\,a^3\,b^2}{3}\right )+2\,a^5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (8\,a^2\,b^3+\frac {16\,b^5}{15}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {16\,b^5}{3}-80\,a^2\,b^3\right )-40\,a^2\,b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-10\,a^4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^7} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________